<%= error_messages_for 'person' %>

<!--[form:person]-->
<fieldset><legend><strong>Editing Person</strong></legend>
<p><label for="person_last_name">Last name</label><br/>
<%= text_field 'person', 'last_name'  %></p>

<p><label for="person_first_name">First name</label><br/>
<%= text_field 'person', 'first_name'  %></p>

<p><label for="person_gender">Gender</label><br/>
<%= select( :person, :gender, Person::GENDERS, {})   %></p>

<p><label for="person_birthdate">Birthdate</label><br/>
<%= date_field 'person', 'birthdate', :format => '%d %b %Y', :value => (@person.birthdate.strftime('%d %b %Y') if @person.birthdate) %></p>

<p><label for="person_default_group_id">Default Check-In Group</label><br/>
<%= collection_select ('person', 'default_group_id', Group.checkin_groups, 'id', 'name', options = {:prompt => "--Choose Group--"})  %></p>

<p><label for="person_household_position">Household position</label><br/>
<%= select( :person, :household_position, Person::POSITIONS, {}) %></p>

<p><label for="person_user_id">User Name</label><br/>
<%= collection_select ('person', 'user_id', User.find(:all).sort_by(&:last_first_name), 'id', 'full_name', {:include_blank => true, :prompt => "--Choose User--"}) %></p>

<p><label for="person_allergies">Allergies</label><br/>
<%= text_area 'person', 'allergies', :rows => 5, :cols => 60  %></p>
<!--[eoform:person]-->
</fieldset>


